//
//  TWWaterLayout.h
//  自定义布局
//
//  Created by 耐克了解了 on 17/4/17.
//  Copyright © 2017年 耐克了解了. All rights reserved.
//

#import <UIKit/UIKit.h>

@class TWWaterLayout;
@protocol TWWaterLayoutDelegate <NSObject>

@required
- (CGFloat)waterFlowLayout:(TWWaterLayout *)waterLayout heighForItemIndex:(NSInteger)index itemWidth:(CGFloat)itemWidth;

@optional
- (CGFloat)columnCountInWaterFlowlayout:(TWWaterLayout*)waterFlowLayout;
- (CGFloat)columnMarginInWaterFlowlayout:(TWWaterLayout*)waterFlowLayout;
- (CGFloat)rowMarginInWaterFlowlayout:(TWWaterLayout*)waterFlowLayout;
- (UIEdgeInsets)edgeInsetsInWaterFlowlayout:(TWWaterLayout*)waterFlowLayout;

@end

@interface TWWaterLayout : UICollectionViewLayout

@property (nonatomic,weak) id <TWWaterLayoutDelegate>delegate;


@end
